﻿<Window x:Class="Gaming_club.Windows.AdminPanel"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Gaming_club.Windows"
        mc:Ignorable="d"
        Title="AdminPanel" Height="2000" Width="1920"
        WindowState="Maximized" Loaded="Window_Loaded" Closing="Window_Closing">

    <Grid>
        <ScrollViewer>
            <Grid>
                <Grid Height="524" Width="960" VerticalAlignment="Top" HorizontalAlignment="Left" Background="AntiqueWhite">
                    <Label Content="Заполнение таблицы игр" HorizontalAlignment="Center" Height="47" Margin="0,10,0,0" 
                           VerticalAlignment="Top" Width="268" FontSize="20" 
                           FontFamily="Segoe UI Black"/>
                    <TextBox Name="txtTitle" HorizontalAlignment="Left" Height="31" 
                         Margin="39,77,0,0" TextWrapping="Wrap" 
                         Text="" VerticalAlignment="Top" 
                         Width="219"/>
                    <Label Content="Название игры" HorizontalAlignment="Left" Height="30" 
                       Margin="39,47,0,0" VerticalAlignment="Top" Width="129"/>
                    <Label Content="Описание игры" HorizontalAlignment="Left" Height="30" 
                    Margin="39,113,0,0" VerticalAlignment="Top" Width="129"/>
                    <TextBox x:Name="txtDescr" HorizontalAlignment="Left" Height="31" 
                    Margin="39,142,0,0" TextWrapping="Wrap" 
                    Text="" VerticalAlignment="Top" 
                    Width="219"/>
                    <ComboBox Name="cmbGenre" HorizontalAlignment="Left" 
                          Margin="39,215,0,0" VerticalAlignment="Top" 
                          Width="120"
                          />
                    <Label Content="Жанр игры" HorizontalAlignment="Left" Height="30" 
                    Margin="39,185,0,0" VerticalAlignment="Top" Width="129"/>
                    <ComboBox Name="cmbGameThematick" HorizontalAlignment="Left" 
                              Margin="39,293,0,0" VerticalAlignment="Top" Width="120"/>
                    <Label Content="Тематика игры" HorizontalAlignment="Left" Height="30" 
                    Margin="39,252,0,0" VerticalAlignment="Top" Width="129"/>
                    <Label Content="Возрастное органичение" 
                           HorizontalAlignment="Left" Height="30" 
                    Margin="39,320,0,0" VerticalAlignment="Top" Width="159"/>
                    <TextBox x:Name="txtAgeLimit" HorizontalAlignment="Left" Height="31" 
                    Margin="39,350,0,0" TextWrapping="Wrap" 
                    Text="" VerticalAlignment="Top" 
                    Width="219"/>
                    <Image x:Name="profileImage" Height="224" Width="270"
                   Margin="300,47,390,0" VerticalAlignment="Top"
                   />
                    <Button x:Name="editImageBtn" Content="Выбрать изображение" 
                            HorizontalAlignment="Left" Height="30" Margin="300,284,0,0" 
                    VerticalAlignment="Top" Width="270" Click="editImageBtn_Click"/>
                    <ComboBox Name="cmbExclusiveGame"  HorizontalAlignment="Left" Margin="39,427,0,0"
                           VerticalAlignment="Top" Width="120"/>
                    <Label Content="Экслюзивность игры" HorizontalAlignment="Left" Height="30" 
                    Margin="39,392,0,0" VerticalAlignment="Top" Width="129"/>
                    <Label Content="Категория игры" HorizontalAlignment="Left" Height="30" 
                    Margin="205,392,0,0" VerticalAlignment="Top" Width="129"/>
                    <ComboBox Name="cmbGameCategory" HorizontalAlignment="Left" Margin="205,427,0,0" 
                          VerticalAlignment="Top" Width="120"/>
                    <Label Content="Цена игры" HorizontalAlignment="Left" Height="30" 
                    Margin="339,392,0,0" VerticalAlignment="Top" Width="129"/>
                    <TextBox x:Name="txtPrice" HorizontalAlignment="Left" Height="31" 
                    Margin="339,418,0,0" TextWrapping="Wrap" 
                    Text="" VerticalAlignment="Top" 
                    Width="219"
                    Visibility="Visible"/>
                    <Button x:Name="btnAddGame" Content="Добавить игру" 
                        HorizontalAlignment="Left" Height="47" 
                        Margin="594,402,0,0" VerticalAlignment="Top"
                        Width="296" Click="btnAddGame_Click"/>

                </Grid>
                <Grid Height="1199" Width="943" VerticalAlignment="Top" 
                  HorizontalAlignment="Right" Background="AntiqueWhite">
                    <Label Content="Заполнение таблицы игротек" 
                           HorizontalAlignment="Center" Height="47" 
                           Margin="0,10,0,0" 
                           VerticalAlignment="Top" Width="330" FontSize="20" 
                           FontFamily="Segoe UI Black"/>
                    <ComboBox Name="cmbGame" HorizontalAlignment="Left" 
                              Margin="10,89,0,0" 
                              VerticalAlignment="Top" Width="120"/>
                    <Label Content="Выбрать игру " HorizontalAlignment="Left"
                           Margin="10,63,0,0" VerticalAlignment="Top" 
                           RenderTransformOrigin="0.276,0.233" Width="120"/>
                    <DatePicker Name="dpDateGameLibrary" HorizontalAlignment="Left" 
                                Margin="10,149,0,0" VerticalAlignment="Top"/>
                    <Label Content="Дата игротеки:" HorizontalAlignment="Left"
                           Height="28" Margin="10,116,0,0" 
                           VerticalAlignment="Top" Width="100"/>
                    <TextBox Name="txtMinPlayers" HorizontalAlignment="Left"
                             Margin="10,218,0,0" TextWrapping="Wrap" 
                             Text="" VerticalAlignment="Top" Width="120"
                             MaxLength="2"/>
                    <TextBox Name="txtMaxPlayers" HorizontalAlignment="Left" 
                             Margin="10,267,0,0" TextWrapping="Wrap" 
                             Text="" VerticalAlignment="Top" Width="120"
                             MaxLength="2"/>
                    <Label Content="Минимальное количество участников" 
                           HorizontalAlignment="Left" Margin="10,187,0,0" 
                           VerticalAlignment="Top" Width="222"/>
                    <Label Content="максимальное количество участников" 
                           HorizontalAlignment="Left" Margin="10,241,0,0"
                           VerticalAlignment="Top" Width="245"/>
                    <ComboBox Name="cmbAddMaster" 
                              HorizontalAlignment="Left" Margin="10,319,0,0" 
                              VerticalAlignment="Top" Width="120">
                        <ComboBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel>
                                    <TextBlock Text="{Binding name}" FontWeight="Bold"/>
                                    <TextBlock Text="{Binding permission}" FontStyle="Italic"/>

                                </StackPanel>
                            </DataTemplate>
                        </ComboBox.ItemTemplate>
                    </ComboBox>
                    <Label Content="Выбрать мастера" HorizontalAlignment="Left"
                           Margin="12,290,0,0" VerticalAlignment="Top" 
                           RenderTransformOrigin="0.276,0.233" Width="120"/>
                    <Button Name="btnAddGameLibrary" 
                            Content="Добавить в таблицу день игротеки" 
                            HorizontalAlignment="Left" Margin="10,434,0,0" 
                            VerticalAlignment="Top" RenderTransformOrigin="0.202,0.086" 
                            Width="222" Click="btnAddGameLibrary_Click"/>
                    <Label Content="Заполнение таблицы турниры" 
                           HorizontalAlignment="Center" 
                           Height="47" Margin="0,523,0,0" 
                        VerticalAlignment="Top" Width="330" FontSize="20" 
                        FontFamily="Segoe UI Black"/>
                    <TextBox x:Name="txtMinAge" HorizontalAlignment="Left"
                        Margin="306,218,0,0" TextWrapping="Wrap" 
                        Text="" VerticalAlignment="Top" Width="61"
                        MaxLength="2"/>
                    <Label Content="Минимальный возраст участников:" 
                        HorizontalAlignment="Left" Margin="306,187,0,0" 
                        VerticalAlignment="Top" Width="224"/>
                    <TextBox x:Name="txtGameLibraryTitle" HorizontalAlignment="Left"
                        Margin="306,267,0,0" TextWrapping="Wrap" 
                        Text="" VerticalAlignment="Top" Width="188"
                        MaxLength="50"/>
                    <Label Content="Название игротеки" 
                        HorizontalAlignment="Left" Margin="306,236,0,0" 
                        VerticalAlignment="Top" Width="224"/>
                    <TextBox x:Name="txtGameLibraryDescription" HorizontalAlignment="Left"
                        Margin="306,319,0,0" TextWrapping="Wrap" 
                        Text="" VerticalAlignment="Top" Width="538"
                        MaxLength="150" Height="113" 
                        RenderTransformOrigin="0.66,0.576"/>
                    <Label Content="Описание игротеки" 
                        HorizontalAlignment="Left"
                        Margin="306,290,0,0" 
                        VerticalAlignment="Top" Width="224"/>

                    <ComboBox Name="cmbTourGame" HorizontalAlignment="Left" 
                              Margin="12,600,0,0" VerticalAlignment="Top" Width="120"/>
                    <Label Content="Выбрать игру "
                           HorizontalAlignment="Left" Height="31"
                           Margin="12,564,0,0" VerticalAlignment="Top"
                           Width="109"/>
                    <ComboBox Name="cmbTourMaster" HorizontalAlignment="Left"
                              Margin="12,662,0,0" 
                              VerticalAlignment="Top" Width="120"/>
                    <Label Content="Выбрать мастера" HorizontalAlignment="Left"
                           Height="30" Margin="12,627,0,0"
                           VerticalAlignment="Top" Width="120"/>
                    <DatePicker Name="dpTourDate" HorizontalAlignment="Left" 
                                Margin="17,702,0,0" VerticalAlignment="Top"/>
                    <TextBox x:Name="txtTourMinAge" 
                             HorizontalAlignment="Left" Margin="17,761,0,0" 
                             TextWrapping="Wrap" Text="" 
                             VerticalAlignment="Top" Width="120"
                             MaxLength="2"/>
                    <Label Content="Минимальный возраст" 
                           HorizontalAlignment="Left" Margin="17,731,0,0" 
                           VerticalAlignment="Top"/>
                    <TextBox x:Name="txtTourPrice" HorizontalAlignment="Left"
                             Margin="17,806,0,0" TextWrapping="Wrap" 
                             Text="" VerticalAlignment="Top" 
                             Width="120"/>
                    <Label Content="Цена" HorizontalAlignment="Left" 
                           Margin="17,779,0,0" VerticalAlignment="Top"/>
                    <TextBox Name="txtTourTitle" HorizontalAlignment="Left" 
                             Height="39" Margin="17,862,0,0" 
                             TextWrapping="Wrap" Text="" 
                             VerticalAlignment="Top" Width="120"/>
                    <Label Content="Название турнира " 
                           HorizontalAlignment="Left" Margin="17,829,0,0" 
                           VerticalAlignment="Top" 
                           RenderTransformOrigin="-0.079,0.733"/>
                    <TextBox Name="txtTourDescr" HorizontalAlignment="Left" 
                             Height="113" Margin="17,947,0,0" 
                             TextWrapping="Wrap" Text="" 
                             VerticalAlignment="Top" Width="350"/>
                    <Label Content="Описание турнира" 
                           HorizontalAlignment="Left" Height="36"
                           Margin="17,906,0,0" VerticalAlignment="Top"
                           Width="120"/>
                    <Button x:Name="btnAddTournament" Content="Добавить турнир"
                            HorizontalAlignment="Left" Height="44"
                            Margin="17,1065,0,0" VerticalAlignment="Top" 
                            Width="350" Click="btnAddTournament_Click"/>


                </Grid>

                <Grid Height="675" Width="960" VerticalAlignment="Top" 
                  HorizontalAlignment="Left" Background="AntiqueWhite" Margin="0,524,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="133*"/>
                        <ColumnDefinition Width="27*"/>
                    </Grid.ColumnDefinitions>
                    <Label Content="Вывод списка пользователей"
                       HorizontalAlignment="Left" Height="36" Margin="324,-13,0,0"
                       VerticalAlignment="Top" Width="312" FontSize="20" 
                       FontFamily="Segoe UI Black"/>

                    <ListBox x:Name="listBoxUser" Margin="23,28,10,267" SelectedValuePath="ID" Grid.ColumnSpan="2">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel>
                                    <TextBlock>
                                <Run Text="Имя: " FontWeight="Bold"/>
                                <Run Text="{Binding name}" FontWeight="Light"/>
                                <Run Text=" Логин: " FontWeight="Bold"/>
                                <Run Text="{Binding login}" FontWeight="Light"/>
                                <Run Text=" Номер телефона: " FontWeight="Bold"/>
                                <Run Text="{Binding phone_number}" FontWeight="Light"/>
                                <Run Text=" Код доступа: " FontWeight="Bold"/> 
                                <Run Text="{Binding permission}"/>
                                <Run Text=" ID: " FontWeight="Bold"/>
                                <Run Text="{Binding id}"/>
                                    </TextBlock>

                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

                    <Button x:Name="btnAllow" Content="Разрешить доступ" HorizontalAlignment="Left" Height="31" Margin="23,436,0,0" VerticalAlignment="Top" Width="457" Click="btnAllow_Click" FontSize="20"/>
                    <Button x:Name="btnProhibit" Content="Запретить доступ" HorizontalAlignment="Left" Height="31" Margin="493,436,0,0" VerticalAlignment="Top" Width="457" Click="btnProhibit_Click" Grid.ColumnSpan="2" FontSize="20"/>
                    <Button Name="btnBackAuth" Content="ВЫЙТИ" 
                        HorizontalAlignment="Left" Height="49" 
                        Margin="23,481,0,0" VerticalAlignment="Top" 
                        Width="457" FontSize="25" Click="btnBackAuth_Click" />
                    <Button x:Name="btnDeleteUser" Content="Удалить пользователя" 
                        HorizontalAlignment="Left" Height="31" Margin="493,481,0,0" 
                        VerticalAlignment="Top" Width="457" 
                         Grid.ColumnSpan="2" FontSize="20" Click="btnDeleteUser_Click"/>
                    <Button x:Name="btnAddMaster" Content="Добавить мастера" 
                        HorizontalAlignment="Left" Height="31" Margin="493,533,0,0" 
                        VerticalAlignment="Top" Width="457" 
                        Grid.ColumnSpan="2" FontSize="20" Click="btnAddMaster_Click"/>
                </Grid>



            </Grid>
        </ScrollViewer>
    </Grid>
</Window>
